<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<script th:src="@{/foreground/assets/js/jquery.min.js}"></script>
<script th:src="@{/foreground/assets/js/layer.js}"></script>
</head>
<style>
    #back-top {
        position: fixed;
        bottom: 300px;
        right: 118px;
        z-index: 99;
    }

    #back-top span {
        width: 50px;
        height: 64px;
        display: block;
    }

    #back-top a {
        outline: none
    }
</style>
<div th:replace="/foreground/client/header::header(${notice.noticeTitle},null)"></div>
<body style="background-color: #e7f5fe">
<a name="top"></a>
<article class="main-content am-g-fixed post-page" style="min-height: 800px;padding-top:100px;background-color: #ffffff">
    <div style="max-width: 1280px;">
        <div>
            <a style="font-size: 18px;color: #5f5f5f" th:href="@{/system/user/toIndex}">首页&nbsp;></a>
            <a style="font-size: 18px;color: #5f5f5f"  >公告&nbsp;></a>
            <a style="font-size: 18px;color: #5f5f5f">[[${notice.noticeTitle}]]</a>
        </div>
        <hr/>
    </div>
    <div class="post-header">
        <h1 class="post-title" itemprop="name headline" style="font-weight: bolder" th:text="${notice.noticeTitle}"></h1>
        <div class="post-data">
            <time th:datetime="${commons.dateFormat(notice.createTime)}" itemprop="datePublished"
                  th:text="'发布于 '+ ${commons.dateFormat(notice.createTime)}"></time>

            <time th:text="'    发布者： '+ ${notice.updateBy}"></time>

        </div>
    </div>
    <br/>
    <div id="post-content" class="post-content content"
         th:utext="${commons.content(notice.noticeContent)}"></div>

</article>
<p id="back-top">
    <a href="#top">
        <img class="fa-eject" style="width: 50px;
            height: 64px;" th:src="@{/foreground/assets/img/o_rocket.png}">
    </a>
</p>
<div th:replace="/foreground/client/footer::footer"></div>
<!-- 使用layer.js实现图片缩放功能 -->
<script type="text/JavaScript">
    $('.post-content img').on('click', function () {
        var imgurl = $(this).attr('src');
        var w = this.width * 2;
        var h = this.height * 2 + 50;
        layer.open({
            type: 1,
            title: false, //不显示标题栏
            area: [w + "px", h + "px"],
            shadeClose: true, //点击遮罩关闭
            content: '\<\div style="padding:20px;">' +
                '\<\img style="width:' + (w - 50) + 'px;" src=' + imgurl + '\>\<\/div>'
        });
    });
</script>

<script>

</script>
</body>
</html>